#!/usr/bin/env bash
# Infer
# python infer.py /home/lhw/workspace/mtl-text-recognition/demo_images
# python local_infer.py /data2/text_eval/detection/idcard_gen_v1/
#
#
# Generate new lmdb dataset
python utils/create_lmdb_dataset.py --inputPath / --gtFile /data1/mjh/datasets/SROIE/detection/test/labels_with_NoSpace.txt --outputPath /data2/lhw/datasets/SROIE_Test
#
#
# Train
# python train.py --train_data /home/lhw/datasets/ID/mix_train --valid_data /home/lhw/datasets/ID/5W_valid --select_data / --batch_ratio 1 --without_prediction --imgW 320 --num_iter 400000 --output_channel 512 --hidden_size 256 --Transformation None --FeatureExtraction VGG --SequenceModeling BiLSTM --Prediction CTC --experiment_name none_id_VGG_bilstm256_Attn --continue_model models/id_finetune.pth
#python train.py --train_data /home/lhw/datasets/ID/mix_train --valid_data /home/lhw/datasets/ID/5W_valid --select_data MJ-ST --batch_ratio 0.5-0.5 --without_prediction --imgW 320 --num_iter 400000 --output_channel 512 --hidden_size 256 --Transformation None --FeatureExtraction VGG --SequenceModeling BiLSTM --Prediction Attn --experiment_name none_id_VGG_bilstm256_Attn --continue_model models/id_finetune.pth

# python train.py --train_data data/lmdb_train --valid_data data/lmdb_test --select_data / --batch_ratio 1 --sensitive --num_iter 40000 --output_channel 512 --hidden_size 256 --Transformation None --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction CTC --experiment_name none_resnet_bilstm_ctc
# Test
# python train.py --train_data data/lmdb_train --valid_data data/lmdb_test --lr 0.01 --select_data / --batch_ratio 1 --sensitive --num_iter 100000 --output_channel 512 --hidden_size 256 --without_prediction --Transformation None --FeatureExtraction VGG --SequenceModeling BiLSTM --Prediction Attn --experiment_name none_resnet_bilstm_attn_id_finetune --continue_model saved_models/none_vgg_bilstm_Attn_news2016zh_finetune/mtl_best_accuracy.pth
# python train.py --train_data /home/lhw/datasets/ID/train/ --valid_data /home/lhw/datasets/ID/5W_valid --batch_ratio 1 --imgW 320 --rgb --num_iter 400000 --output_channel 512 --hidden_size 256 --Transformation None --FeatureExtraction VGG --SequenceModeling BiLSTM --Prediction Attn --select_data / --input_channel 3 --experiment_name none_id_VGG_bilstm256_Attn_channel_3